import type { App } from 'vue';
import { type RouteRecordRaw, createRouter, createWebHistory } from 'vue-router';
import { HOME_ROUTE } from './home';
import { WORK_ROUTE } from './work';

export const routes: RouteRecordRaw[] = [
  HOME_ROUTE,
  WORK_ROUTE,
];

export const router = createRouter({
  routes,
  history: createWebHistory('/'),
});

export async function setupRouter(app: App) {
  app.use(router);
  await router.isReady();
}
export * from './home';
export * from './work';
